home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compendium Deluxe 2
/
LSD and 17bit Compendium Deluxe - Volume II.iso
/
a
/
prog
/
asmsrc
/
tango2.lha
/
macros
< prev
next >
Wrap
Text File
|
1988-07-19
|
2KB
|
117 lines
Cwait MACRO
DC.B \1,\2+9,$FF,$FE WAIT 10,09
ENDM
Cskip: MACRO
DC.B \1,\2+9,$FF,$FF SKIP 10,09
ENDM
Cmove MACRO
DC.W \2,\1 MOV 50,$180
ENDM
alloc MACRO
MOVE.L $4,A6
MOVE.L #\1,D0
MOVE.L #\2,D1
JSR -198(A6) ALLOC 100,$10002,mem
move.l d0,\3
ENDM
free MACRO
MOVE.L $4,A6
MOVE.L \1,a1
MOVE.L #\2,D0
JSR -210(A6) FREE MEM,100
ENDM
incq Macro Increment quick
addq \1,\2
Endm
incb Macro Increment byte
add.b \1,\2
Endm
incw Macro Increment word
add.w \1,\2
Endm
incl Macro Increment long word
add.l \1,\2
Endm
decq Macro
subq \1,\2
Endm
decb Macro
sub.b \1,\2
Endm
decw Macro
sub.w \1,\2
Endm
decl Macro
sub.l \1,\2
Endm
*********************************************************************************************
;Co-processor Macros
end_copper Macro
dc.w $ffff,$fffe
Endm
set_pal Macro
dc.w $ffdf,$fffe
Endm
wait Macro
dc.w \1,\2
Endm
put Macro
dc.w \1,\2
Endm
*********************************************************************************************
;Stack Macros
even
push Macro Save a register on stack
movem.l \1,-(sp)
Endm
pop Macro Return a register from stack
movem.l (sp)+,\1
Endm
save_all Macro
movem.l a0-a6/d0-d7,-(sp)
Endm
return_all Macro
movem.l (sp)+,d0-d7/a0-a6
Endm
******************************************************************************************
;EXEC macros
CALLEXEC macro
move.l 4.w,a6
endm
******************************************************************************************
;Mouse macro
test_mouse macro
test btst #6,$bfe001
bne.s test
endm